/*
 * @Author: c
 * @Date: 2024-01-08 22:13:45
 * @LastEditTime: 2024-03-09 18:19:06
 * @LastEditors: c
 * @Description: 
 * @FilePath: \music-web-backend\src\core\music\banner\entities\banner.entity.ts
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: c
 * @Date: 2024-01-08 22:13:45
 * @LastEditTime: 2024-03-01 13:11:28
 * @LastEditors: c
 * @Description: 
 * @FilePath: \music-web-backend\src\core\music\banner\entities\banner.entity.ts
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// Generated by https://quicktype.io
import { BasicEntity } from "src/common/entity/basic.entity";
import { BannerType } from "src/common/enums/banner.enum";
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity('banner')
export class Banner extends BasicEntity {
    @PrimaryGeneratedColumn()
    id: number;
    pic: string;
    title: string;
    @Column({
        name: "jump_type",
        type: 'enum',
        nullable: true,
        enum:BannerType,
        default: null,
        comment: "轮播图类型"
    })
    jumpType: BannerType;
    
    scenesName: string;
    scenesCode: string;
    scenes: string;

    @Column({
        name: "jump_link_output",
        type: 'int',
        nullable: true,
        default: null,
        comment: "关联资源的唯一标识"
    })
    jumpLinkOutput: number;

    @Column({
        name: "sort",
        type: 'int',
        nullable: false,
        default: 0,
        comment: "轮播图排序"
    })
    sort: number;

    @Column({
        name: "show_start_date",
        type: 'date',
        nullable: true,
        default: null,
        comment: "轮播图开始时间"
    })
    showStartDate: Date;

    @Column({
        name: "show_end_date",
        type: 'date',
        nullable: true,
        default: null,
        comment: "轮播图结束时间"
    })
    showEndDate: Date;


}
